<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // let hd = 2 ? (3 ? "" : "") : 5;
        // console.log(hd);
        function div(option = {}) {
            let div = document.createElement("div");
            div.style.width = option.width ?
                option.width : "100px";
            div.style.height = option.height ? option.height : "100px";
            div.style.backgroundColor = option.backgroundColor ? option.backgroundColor : "red";
            document.body.appendChild(div);
        }

        div({ width: "200px" });

    </script>
</body>

</html>